3.956 \(\int \frac {A+B x}{x^2 \sqrt {a+b x+c x^2}} \, dx\)

Optimal. Leaf size=72 \[ \frac {(A b-2 a B) \tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{2 a^{3/2}}-\frac {A \sqrt {a+b x+c x^2}}{a x} \]

[Out]

1/2*(A*b-2*B*a)*arctanh(1/2*(b*x+2*a)/a^(1/2)/(c*x^2+b*x+a)^(1/2))/a^(3/2)-A*(c*x^2+b*x+a)^(1/2)/a/x

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {806, 724, 206} \[ \frac {(A b-2 a B) \tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{2 a^{3/2}}-\frac {A \sqrt {a+b x+c x^2}}{a x} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x^2*Sqrt[a + b*x + c*x^2]),x]

[Out]

-((A*Sqrt[a + b*x + c*x^2])/(a*x)) + ((A*b - 2*a*B)*ArcTanh[(2*a + b*x)/(2*Sqrt[a]*Sqrt[a + b*x + c*x^2])])/(2
*a^(3/2))

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-2, Subst[Int[1/(4*c*d
^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, (2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a,
b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 806

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> -Si
mp[((e*f - d*g)*(d + e*x)^(m + 1)*(a + b*x + c*x^2)^(p + 1))/(2*(p + 1)*(c*d^2 - b*d*e + a*e^2)), x] - Dist[(b
*(e*f + d*g) - 2*(c*d*f + a*e*g))/(2*(c*d^2 - b*d*e + a*e^2)), Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x],
x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && EqQ[Sim
plify[m + 2*p + 3], 0]

Rubi steps

\begin {align*} \int \frac {A+B x}{x^2 \sqrt {a+b x+c x^2}} \, dx &=-\frac {A \sqrt {a+b x+c x^2}}{a x}-\frac {(A b-2 a B) \int \frac {1}{x \sqrt {a+b x+c x^2}} \, dx}{2 a}\\ &=-\frac {A \sqrt {a+b x+c x^2}}{a x}+\frac {(A b-2 a B) \operatorname {Subst}\left (\int \frac {1}{4 a-x^2} \, dx,x,\frac {2 a+b x}{\sqrt {a+b x+c x^2}}\right )}{a}\\ &=-\frac {A \sqrt {a+b x+c x^2}}{a x}+\frac {(A b-2 a B) \tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+b x+c x^2}}\right )}{2 a^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 70, normalized size = 0.97 \[ \frac {(A b-2 a B) \tanh ^{-1}\left (\frac {2 a+b x}{2 \sqrt {a} \sqrt {a+x (b+c x)}}\right )}{2 a^{3/2}}-\frac {A \sqrt {a+x (b+c x)}}{a x} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x^2*Sqrt[a + b*x + c*x^2]),x]

[Out]

-((A*Sqrt[a + x*(b + c*x)])/(a*x)) + ((A*b - 2*a*B)*ArcTanh[(2*a + b*x)/(2*Sqrt[a]*Sqrt[a + x*(b + c*x)])])/(2
*a^(3/2))

________________________________________________________________________________________

fricas [A]  time = 1.36, size = 177, normalized size = 2.46 \[ \left [-\frac {{\left (2 \, B a - A b\right )} \sqrt {a} x \log \left (-\frac {8 \, a b x + {\left (b^{2} + 4 \, a c\right )} x^{2} + 4 \, \sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {a} + 8 \, a^{2}}{x^{2}}\right ) + 4 \, \sqrt {c x^{2} + b x + a} A a}{4 \, a^{2} x}, \frac {{\left (2 \, B a - A b\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {c x^{2} + b x + a} {\left (b x + 2 \, a\right )} \sqrt {-a}}{2 \, {\left (a c x^{2} + a b x + a^{2}\right )}}\right ) - 2 \, \sqrt {c x^{2} + b x + a} A a}{2 \, a^{2} x}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^2/(c*x^2+b*x+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/4*((2*B*a - A*b)*sqrt(a)*x*log(-(8*a*b*x + (b^2 + 4*a*c)*x^2 + 4*sqrt(c*x^2 + b*x + a)*(b*x + 2*a)*sqrt(a)
 + 8*a^2)/x^2) + 4*sqrt(c*x^2 + b*x + a)*A*a)/(a^2*x), 1/2*((2*B*a - A*b)*sqrt(-a)*x*arctan(1/2*sqrt(c*x^2 + b
*x + a)*(b*x + 2*a)*sqrt(-a)/(a*c*x^2 + a*b*x + a^2)) - 2*sqrt(c*x^2 + b*x + a)*A*a)/(a^2*x)]

________________________________________________________________________________________

giac [A]  time = 0.23, size = 110, normalized size = 1.53 \[ \frac {{\left (2 \, B a - A b\right )} \arctan \left (-\frac {\sqrt {c} x - \sqrt {c x^{2} + b x + a}}{\sqrt {-a}}\right )}{\sqrt {-a} a} + \frac {{\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} A b + 2 \, A a \sqrt {c}}{{\left ({\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} - a\right )} a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^2/(c*x^2+b*x+a)^(1/2),x, algorithm="giac")

[Out]

(2*B*a - A*b)*arctan(-(sqrt(c)*x - sqrt(c*x^2 + b*x + a))/sqrt(-a))/(sqrt(-a)*a) + ((sqrt(c)*x - sqrt(c*x^2 +
b*x + a))*A*b + 2*A*a*sqrt(c))/(((sqrt(c)*x - sqrt(c*x^2 + b*x + a))^2 - a)*a)

________________________________________________________________________________________

maple [A]  time = 0.08, size = 94, normalized size = 1.31 \[ \frac {A b \ln \left (\frac {b x +2 a +2 \sqrt {c \,x^{2}+b x +a}\, \sqrt {a}}{x}\right )}{2 a^{\frac {3}{2}}}-\frac {B \ln \left (\frac {b x +2 a +2 \sqrt {c \,x^{2}+b x +a}\, \sqrt {a}}{x}\right )}{\sqrt {a}}-\frac {\sqrt {c \,x^{2}+b x +a}\, A}{a x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x^2/(c*x^2+b*x+a)^(1/2),x)

[Out]

-A*(c*x^2+b*x+a)^(1/2)/a/x+1/2*A*b/a^(3/2)*ln((b*x+2*a+2*(c*x^2+b*x+a)^(1/2)*a^(1/2))/x)-B/a^(1/2)*ln((b*x+2*a
+2*(c*x^2+b*x+a)^(1/2)*a^(1/2))/x)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^2/(c*x^2+b*x+a)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` f
or more details)Is 4*a*c-b^2 positive, negative or zero?

________________________________________________________________________________________

mupad [B]  time = 1.46, size = 87, normalized size = 1.21 \[ \frac {A\,b\,\mathrm {atanh}\left (\frac {a+\frac {b\,x}{2}}{\sqrt {a}\,\sqrt {c\,x^2+b\,x+a}}\right )}{2\,a^{3/2}}-\frac {A\,\sqrt {c\,x^2+b\,x+a}}{a\,x}-\frac {B\,\ln \left (\frac {b}{2}+\frac {a}{x}+\frac {\sqrt {a}\,\sqrt {c\,x^2+b\,x+a}}{x}\right )}{\sqrt {a}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(x^2*(a + b*x + c*x^2)^(1/2)),x)

[Out]

(A*b*atanh((a + (b*x)/2)/(a^(1/2)*(a + b*x + c*x^2)^(1/2))))/(2*a^(3/2)) - (A*(a + b*x + c*x^2)^(1/2))/(a*x) -
 (B*log(b/2 + a/x + (a^(1/2)*(a + b*x + c*x^2)^(1/2))/x))/a^(1/2)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {A + B x}{x^{2} \sqrt {a + b x + c x^{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x**2/(c*x**2+b*x+a)**(1/2),x)

[Out]

Integral((A + B*x)/(x**2*sqrt(a + b*x + c*x**2)), x)

________________________________________________________________________________________